/*
7. Write a program that asks for a number and a power. Write a recursive function 
that takes the number to the power. Thus, if the number is 2 and the power is 4, 
the function will return 16.

*/
#include <iostream.h>

int Raise(int, int);

int main(){
	int number, power;
	cout << "\nEnter a number you want to raise to a power: ";
	cin >> number;
	cout << "Enter the power: ";
	cin >> power;
	cout << "Your number raised to your power is: " << Raise(number, power) << endl;
	return 0;
}

int Raise(int number, int power){
	if(power==0)
		return 1;
	else
		return number*Raise(number, power-1);
}
